/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * Vista.java
 *
 * Created on 27/08/2009, 02:44:45 PM
 */

package Vista;

/**
 *
 * @author felipe
 */

import Analisis.Determinante;
import Ciphers.*;
import javax.swing.JComboBox;
import javax.swing.JOptionPane;


public class Vista extends javax.swing.JFrame {

    /** Creates new form Vista */
    public Vista() {
        initComponents();
        
        

               hillPanel.setVisible(false);
                key.setVisible(true);
                hillk.setVisible(false);
                keyb.setVisible(false);
                afinb.setVisible(false);
                MHill.setVisible(false);
                KeyMcombo.setVisible(false);
                tipocifrador.setSelectedIndex(0);
                

    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        Tclaro = new javax.swing.JTextArea();
        jLabel2 = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        Tcifrado = new javax.swing.JTextArea();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        jScrollPane4 = new javax.swing.JScrollPane();
        Tcifrado2 = new javax.swing.JTextArea();
        jScrollPane3 = new javax.swing.JScrollPane();
        Tclaro2 = new javax.swing.JTextArea();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        descifrar = new javax.swing.JButton();
        jButton3 = new javax.swing.JButton();
        jPanel3 = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        key = new javax.swing.JTextField();
        keyb = new javax.swing.JTextField();
        tipocifrador = new javax.swing.JComboBox();
        jLabel6 = new javax.swing.JLabel();
        afinb = new javax.swing.JLabel();
        hillk = new javax.swing.JButton();
        jLabel8 = new javax.swing.JLabel();
        MHill = new javax.swing.JLabel();
        KeyMcombo = new javax.swing.JComboBox();
        hillPanel = new javax.swing.JPanel();
        hk1 = new javax.swing.JComboBox();
        hk2 = new javax.swing.JComboBox();
        hk3 = new javax.swing.JComboBox();
        hk4 = new javax.swing.JComboBox();
        hk5 = new javax.swing.JComboBox();
        hk6 = new javax.swing.JComboBox();
        hk7 = new javax.swing.JComboBox();
        hk8 = new javax.swing.JComboBox();
        hk9 = new javax.swing.JComboBox();
        hk10 = new javax.swing.JComboBox();
        hk11 = new javax.swing.JComboBox();
        hk12 = new javax.swing.JComboBox();
        hk33 = new javax.swing.JComboBox();
        hk34 = new javax.swing.JComboBox();
        hk35 = new javax.swing.JComboBox();
        hk36 = new javax.swing.JComboBox();
        hk37 = new javax.swing.JComboBox();
        hk38 = new javax.swing.JComboBox();
        hk39 = new javax.swing.JComboBox();
        hk40 = new javax.swing.JComboBox();
        hk41 = new javax.swing.JComboBox();
        hk42 = new javax.swing.JComboBox();
        hk43 = new javax.swing.JComboBox();
        hk44 = new javax.swing.JComboBox();
        hk45 = new javax.swing.JComboBox();
        hk46 = new javax.swing.JComboBox();
        hk47 = new javax.swing.JComboBox();
        hk48 = new javax.swing.JComboBox();
        hk49 = new javax.swing.JComboBox();
        hk50 = new javax.swing.JComboBox();
        hk51 = new javax.swing.JComboBox();
        hk52 = new javax.swing.JComboBox();
        hk53 = new javax.swing.JComboBox();
        hk54 = new javax.swing.JComboBox();
        hk55 = new javax.swing.JComboBox();
        hk56 = new javax.swing.JComboBox();
        hk57 = new javax.swing.JComboBox();
        hk58 = new javax.swing.JComboBox();
        hk59 = new javax.swing.JComboBox();
        hk60 = new javax.swing.JComboBox();
        hk61 = new javax.swing.JComboBox();
        hk62 = new javax.swing.JComboBox();
        hk63 = new javax.swing.JComboBox();
        hk64 = new javax.swing.JComboBox();
        hk17 = new javax.swing.JComboBox();
        hk18 = new javax.swing.JComboBox();
        hk19 = new javax.swing.JComboBox();
        hk20 = new javax.swing.JComboBox();
        hk21 = new javax.swing.JComboBox();
        hk22 = new javax.swing.JComboBox();
        hk23 = new javax.swing.JComboBox();
        hk24 = new javax.swing.JComboBox();
        hk25 = new javax.swing.JComboBox();
        hk26 = new javax.swing.JComboBox();
        hk27 = new javax.swing.JComboBox();
        hk28 = new javax.swing.JComboBox();
        hk29 = new javax.swing.JComboBox();
        hk30 = new javax.swing.JComboBox();
        hk31 = new javax.swing.JComboBox();
        hk32 = new javax.swing.JComboBox();
        hk13 = new javax.swing.JComboBox();
        hk14 = new javax.swing.JComboBox();
        hk15 = new javax.swing.JComboBox();
        hk16 = new javax.swing.JComboBox();
        jPanel4 = new javax.swing.JPanel();
        PerK = new javax.swing.JComboBox();
        PerK1 = new javax.swing.JComboBox();
        PerK2 = new javax.swing.JComboBox();
        PerK3 = new javax.swing.JComboBox();
        PerK4 = new javax.swing.JComboBox();
        PerK5 = new javax.swing.JComboBox();
        PerK6 = new javax.swing.JComboBox();
        PerK7 = new javax.swing.JComboBox();

        setTitle("Crifradores");

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Cifrar"));

        jLabel1.setText("Texto Claro");

        Tclaro.setColumns(20);
        Tclaro.setRows(5);
        jScrollPane1.setViewportView(Tclaro);

        jLabel2.setText("Texto Cifrado");

        Tcifrado.setColumns(20);
        Tcifrado.setRows(5);
        jScrollPane2.setViewportView(Tcifrado);

        jButton1.setText("Cifrar");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jButton2.setText("Clear");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(143, 143, 143)
                        .addComponent(jLabel1))
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 334, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 334, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(143, 143, 143)
                        .addComponent(jLabel2)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(50, 50, 50)
                .addComponent(jButton1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 115, Short.MAX_VALUE)
                .addComponent(jButton2)
                .addGap(73, 73, 73))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jLabel2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton1)
                    .addComponent(jButton2))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Descifrar"));

        Tcifrado2.setColumns(20);
        Tcifrado2.setRows(5);
        jScrollPane4.setViewportView(Tcifrado2);

        Tclaro2.setColumns(20);
        Tclaro2.setRows(5);
        jScrollPane3.setViewportView(Tclaro2);

        jLabel4.setText("Texto Claro");

        jLabel5.setText("Texto cifrado");

        descifrar.setText("Descifrar");
        descifrar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                descifrarActionPerformed(evt);
            }
        });

        jButton3.setText("Clear");
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 334, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(136, 136, 136)
                        .addComponent(jLabel5))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 334, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(136, 136, 136)
                        .addComponent(jLabel4)))
                .addContainerGap(70, Short.MAX_VALUE))
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(54, 54, 54)
                .addComponent(descifrar)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 115, Short.MAX_VALUE)
                .addComponent(jButton3)
                .addGap(113, 113, 113))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel5)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel4)
                .addGap(14, 14, 14)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(descifrar)
                    .addComponent(jButton3))
                .addGap(37, 37, 37))
        );

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Opciones de Cifrado"));

        jLabel3.setText("Key");

        keyb.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                keybActionPerformed(evt);
            }
        });

        tipocifrador.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Shift", "Affine", "Vigenere", "Sustitucion", "Hill", "Permutacion", "SPN", "SDES" }));
        tipocifrador.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                tipocifradorActionPerformed(evt);
            }
        });

        jLabel6.setText("Selecionar Cifrador");

        afinb.setText("b");

        hillk.setText("Ingresar key");
        hillk.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                hillkActionPerformed(evt);
            }
        });

        jLabel8.setText("Ingrese la clave que va a utilizar para el cifrado");

        MHill.setText("M");

        KeyMcombo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "2", "3", "4", "5", "6", "7", "8" }));

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(tipocifrador, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel6))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(hillk, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel3Layout.createSequentialGroup()
                                        .addComponent(jLabel3)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(MHill)
                                        .addGap(14, 14, 14)
                                        .addComponent(KeyMcombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(key, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel3Layout.createSequentialGroup()
                                        .addGap(20, 20, 20)
                                        .addComponent(afinb))
                                    .addGroup(jPanel3Layout.createSequentialGroup()
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(keyb, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE))))))
                    .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 268, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(jLabel3)
                    .addComponent(afinb)
                    .addComponent(MHill)
                    .addComponent(KeyMcombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(tipocifrador, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(key, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(keyb, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(hillk)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        hillPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Clave Hill"));

        hk1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk4.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk5.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk6.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk7.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk8.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk9.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", " " }));

        hk10.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", " " }));

        hk11.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk12.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk33.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", " " }));

        hk34.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk35.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk36.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk37.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", " " }));

        hk38.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk39.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk40.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk41.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk42.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk43.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk44.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk45.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk46.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk47.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk48.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk49.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk50.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk51.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk52.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk53.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk54.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk55.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk56.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk57.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk58.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk59.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk60.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk61.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk62.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk63.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk64.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk17.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk18.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", " " }));

        hk19.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk20.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk21.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk22.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk23.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk24.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk25.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk26.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk27.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk28.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", " " }));

        hk29.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk30.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk31.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk32.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", " " }));

        hk13.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk14.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk15.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        hk16.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25" }));

        javax.swing.GroupLayout hillPanelLayout = new javax.swing.GroupLayout(hillPanel);
        hillPanel.setLayout(hillPanelLayout);
        hillPanelLayout.setHorizontalGroup(
            hillPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(hillPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(hillPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(hillPanelLayout.createSequentialGroup()
                        .addComponent(hk1, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk2, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk3, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk4, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk5, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk6, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk7, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk8, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(hillPanelLayout.createSequentialGroup()
                        .addComponent(hk9, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk10, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk11, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk12, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk13, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk14, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk15, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk16, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(hillPanelLayout.createSequentialGroup()
                        .addComponent(hk33, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk34, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk35, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk36, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk37, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk38, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk39, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk40, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(hillPanelLayout.createSequentialGroup()
                        .addComponent(hk41, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk42, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk43, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk44, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk45, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk46, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk47, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk48, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(hillPanelLayout.createSequentialGroup()
                        .addComponent(hk49, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk50, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk51, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk52, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk53, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk54, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk55, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk56, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(hillPanelLayout.createSequentialGroup()
                        .addComponent(hk57, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk58, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk59, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk60, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk61, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk62, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk63, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk64, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(hillPanelLayout.createSequentialGroup()
                        .addComponent(hk17, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk18, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk19, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk20, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk21, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk22, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk23, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk24, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(hillPanelLayout.createSequentialGroup()
                        .addComponent(hk25, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk26, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk27, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk28, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk29, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk30, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk31, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(hk32, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        hillPanelLayout.setVerticalGroup(
            hillPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(hillPanelLayout.createSequentialGroup()
                .addGroup(hillPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(hk1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(hillPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(hk9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(hillPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(hk17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk21, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk22, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk23, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk24, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(hillPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(hk25, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk26, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk27, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk28, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk29, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk30, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk31, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk32, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(hillPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(hk33, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk34, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk35, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk36, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk37, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk38, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk39, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk40, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(hillPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(hk41, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk42, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk43, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk44, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk45, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk46, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk47, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk48, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(hillPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(hk49, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk50, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk51, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk52, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk53, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk54, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk55, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk56, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(hillPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(hk57, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk58, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk59, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk60, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk61, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk62, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk63, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(hk64, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder("Clave Permutacion"));

        PerK.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", " " }));
        PerK.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                PerKActionPerformed(evt);
            }
        });

        PerK1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", " " }));

        PerK2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", " " }));

        PerK3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", " " }));

        PerK4.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", " " }));

        PerK5.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", " " }));

        PerK6.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", " " }));

        PerK7.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", " " }));

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGap(6, 6, 6)
                .addComponent(PerK, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(PerK1, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(PerK2, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(PerK3, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(PerK4, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(PerK5, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(PerK6, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(PerK7, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(PerK, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(PerK1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(PerK2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(PerK3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(PerK4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(PerK5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(PerK6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(PerK7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(30, 30, 30)
                        .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jPanel4, 0, 401, Short.MAX_VALUE)
                            .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addComponent(hillPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(24, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel2, 0, 340, Short.MAX_VALUE)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addComponent(hillPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
        //int[][] khill={{11,8},{3,7}};

        switch(tipocifrador.getSelectedIndex()){

          case 0:
               Shift texc=new Shift(Tclaro.getText());
               Tcifrado.setText(texc.cifrar(Integer.parseInt(key.getText())));
               System.out.println(tipocifrador.getSelectedItem());
               System.out.println(tipocifrador.getSelectedIndex());
                break;
          case 1:
                Affine texc2=new Affine(Tclaro.getText());
                

                if((Z26.inver(Integer.parseInt(key.getText()))==0)||(Integer.parseInt(keyb.getText())>25)||(Integer.parseInt(keyb.getText())<0)){

                    JOptionPane.showMessageDialog(null, "El valor de la clave es invalido");


                }else{
                Tcifrado.setText(texc2.cifrar(Integer.parseInt(key.getText()), Integer.parseInt(keyb.getText())));
                
                }
                break;
          case 2:
                Vigenere texc3=new Vigenere(Tclaro.getText());
                Tcifrado.setText(texc3.cifrar(key.getText()));
                System.out.println(tipocifrador.getSelectedItem());
                break;
          case 3:
                Sustitucion texc4=new Sustitucion(Tclaro.getText());
                Tcifrado.setText(texc4.cifrar(key.getText()));
                System.out.println(tipocifrador.getSelectedItem());
                break;
          case 4:
              
                int k=0;
                int matriz[][]= new int [KeyMcombo.getSelectedIndex()+2][KeyMcombo.getSelectedIndex()+2];

                int arreglo[] = new int[64];
                String cadena = Tclaro.getText();

                arreglo[0]=hk1.getSelectedIndex();
                arreglo[1]=hk2.getSelectedIndex();
                arreglo[2]=hk3.getSelectedIndex();
                arreglo[3]=hk4.getSelectedIndex();
                arreglo[4]=hk5.getSelectedIndex();
                arreglo[5]=hk6.getSelectedIndex();
                arreglo[6]=hk7.getSelectedIndex();
                arreglo[7]=hk8.getSelectedIndex();
                arreglo[8]=hk9.getSelectedIndex();
                arreglo[9]=hk10.getSelectedIndex();
                arreglo[10]=hk11.getSelectedIndex();
                arreglo[11]=hk12.getSelectedIndex();
                arreglo[12]=hk13.getSelectedIndex();
                arreglo[13]=hk14.getSelectedIndex();
                arreglo[14]=hk15.getSelectedIndex();
                arreglo[15]=hk16.getSelectedIndex();
                arreglo[16]=hk17.getSelectedIndex();
                arreglo[17]=hk18.getSelectedIndex();
                arreglo[18]=hk19.getSelectedIndex();
                arreglo[19]=hk20.getSelectedIndex();
                arreglo[20]=hk21.getSelectedIndex();
                arreglo[21]=hk22.getSelectedIndex();
                arreglo[22]=hk23.getSelectedIndex();
                arreglo[23]=hk24.getSelectedIndex();
                arreglo[24]=hk25.getSelectedIndex();
                arreglo[25]=hk26.getSelectedIndex();
                arreglo[26]=hk27.getSelectedIndex();
                arreglo[27]=hk28.getSelectedIndex();
                arreglo[28]=hk29.getSelectedIndex();
                arreglo[29]=hk30.getSelectedIndex();
                arreglo[30]=hk31.getSelectedIndex();
                arreglo[31]=hk32.getSelectedIndex();
                arreglo[32]=hk33.getSelectedIndex();
                arreglo[33]=hk34.getSelectedIndex();
                arreglo[34]=hk35.getSelectedIndex();
                arreglo[35]=hk36.getSelectedIndex();
                arreglo[36]=hk37.getSelectedIndex();
                arreglo[37]=hk38.getSelectedIndex();
                arreglo[38]=hk39.getSelectedIndex();
                arreglo[39]=hk40.getSelectedIndex();
                arreglo[40]=hk41.getSelectedIndex();
                arreglo[41]=hk42.getSelectedIndex();
                arreglo[42]=hk43.getSelectedIndex();
                arreglo[43]=hk44.getSelectedIndex();
                arreglo[44]=hk45.getSelectedIndex();
                arreglo[45]=hk46.getSelectedIndex();
                arreglo[46]=hk47.getSelectedIndex();
                arreglo[47]=hk48.getSelectedIndex();
                arreglo[48]=hk49.getSelectedIndex();
                arreglo[49]=hk50.getSelectedIndex();
                arreglo[50]=hk51.getSelectedIndex();
                arreglo[51]=hk52.getSelectedIndex();
                arreglo[52]=hk53.getSelectedIndex();
                arreglo[53]=hk54.getSelectedIndex();
                arreglo[54]=hk55.getSelectedIndex();
                arreglo[55]=hk56.getSelectedIndex();
                arreglo[56]=hk57.getSelectedIndex();
                arreglo[57]=hk58.getSelectedIndex();
                arreglo[58]=hk59.getSelectedIndex();
                arreglo[59]=hk60.getSelectedIndex();
                arreglo[60]=hk61.getSelectedIndex();
                arreglo[61]=hk62.getSelectedIndex();
                arreglo[62]=hk63.getSelectedIndex();
                arreglo[63]=hk64.getSelectedIndex();
               



                k=0;
                for(int i=0; i<KeyMcombo.getSelectedIndex()+2; i++){

                    for(int j=0; j<KeyMcombo.getSelectedIndex()+2; j++){

                        matriz[i][j]=arreglo[k];
                        k++;

                    }

                }

                int det = Determinante.determinante(matriz);
                System.out.println(det);

                if(Z26.inver(det)==0){
                JOptionPane.showMessageDialog(null, "La Matriz ingresada es invalida");
                }else{


                Hill texc5=new Hill(Tclaro.getText());

                Tcifrado.setText(texc5.cifrar(matriz,KeyMcombo.getSelectedIndex()+2));
                }
                break;
          case 5:
                int [] arreglo2 = {0,0,0,0,0,0,0,0};
                arreglo2[0]=PerK.getSelectedIndex();
                arreglo2[1]=PerK1.getSelectedIndex();
                arreglo2[2]=PerK2.getSelectedIndex();
                arreglo2[3]=PerK3.getSelectedIndex();
                arreglo2[4]=PerK4.getSelectedIndex();
                arreglo2[5]=PerK5.getSelectedIndex();
                arreglo2[6]=PerK6.getSelectedIndex();
                arreglo2[7]=PerK7.getSelectedIndex();
                String LLave="";
                 for(int i=0; i<KeyMcombo.getSelectedIndex()+2; i++){

                     LLave += arreglo2[i];


                 }

                Permutacion texc6 =new Permutacion(Tclaro.getText());
                Tcifrado.setText(texc6.cifrar(LLave));
                System.out.println(tipocifrador.getSelectedItem());

                break;
        }

        
    }//GEN-LAST:event_jButton1ActionPerformed

    private void keybActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_keybActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_keybActionPerformed

    private void descifrarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_descifrarActionPerformed
        // TODO add your handling code here:
        switch(tipocifrador.getSelectedIndex()){

          case 0:
               Shift tex=new Shift(Tcifrado2.getText());
               Tclaro2.setText(tex.descifrar(Integer.parseInt(key.getText())));
               System.out.println(tipocifrador.getSelectedItem());
                break;
          case 1:
               Affine tex2=new Affine(Tcifrado2.getText());
                Tclaro2.setText(tex2.descifrar(Integer.parseInt(key.getText()), Integer.parseInt(keyb.getText())));
                System.out.println(tipocifrador.getSelectedItem());
                break;
          case 2:
                Vigenere tex3=new Vigenere(Tcifrado2.getText());
                Tclaro2.setText(tex3.descifrar(key.getText()));
                System.out.println(tipocifrador.getSelectedItem());
                break;
          case 3:
                Sustitucion texc4=new Sustitucion(Tcifrado2.getText());
                Tclaro2.setText(texc4.cifrar(key.getText()));
                System.out.println(tipocifrador.getSelectedItem());
                break;
          case 4:
                System.out.println(tipocifrador.getSelectedItem());
                int k=0;
                int matriz[][]= new int [KeyMcombo.getSelectedIndex()+2][KeyMcombo.getSelectedIndex()+2];

                int arreglo[] = new int[64];
                String cadena = Tclaro.getText();

                arreglo[0]=hk1.getSelectedIndex();
                arreglo[1]=hk2.getSelectedIndex();
                arreglo[2]=hk3.getSelectedIndex();
                arreglo[3]=hk4.getSelectedIndex();
                arreglo[4]=hk5.getSelectedIndex();
                arreglo[5]=hk6.getSelectedIndex();
                arreglo[6]=hk7.getSelectedIndex();
                arreglo[7]=hk8.getSelectedIndex();
                arreglo[8]=hk9.getSelectedIndex();
                arreglo[9]=hk10.getSelectedIndex();
                arreglo[10]=hk11.getSelectedIndex();
                arreglo[11]=hk12.getSelectedIndex();
                arreglo[12]=hk13.getSelectedIndex();
                arreglo[13]=hk14.getSelectedIndex();
                arreglo[14]=hk15.getSelectedIndex();
                arreglo[15]=hk16.getSelectedIndex();
                arreglo[16]=hk17.getSelectedIndex();
                arreglo[17]=hk18.getSelectedIndex();
                arreglo[18]=hk19.getSelectedIndex();
                arreglo[19]=hk20.getSelectedIndex();
                arreglo[20]=hk21.getSelectedIndex();
                arreglo[21]=hk22.getSelectedIndex();
                arreglo[22]=hk23.getSelectedIndex();
                arreglo[23]=hk24.getSelectedIndex();
                arreglo[24]=hk25.getSelectedIndex();
                arreglo[25]=hk26.getSelectedIndex();
                arreglo[26]=hk27.getSelectedIndex();
                arreglo[27]=hk28.getSelectedIndex();
                arreglo[28]=hk29.getSelectedIndex();
                arreglo[29]=hk30.getSelectedIndex();
                arreglo[30]=hk31.getSelectedIndex();
                arreglo[31]=hk32.getSelectedIndex();
                arreglo[32]=hk33.getSelectedIndex();
                arreglo[33]=hk34.getSelectedIndex();
                arreglo[34]=hk35.getSelectedIndex();
                arreglo[35]=hk36.getSelectedIndex();
                arreglo[36]=hk37.getSelectedIndex();
                arreglo[37]=hk38.getSelectedIndex();
                arreglo[38]=hk39.getSelectedIndex();
                arreglo[39]=hk40.getSelectedIndex();
                arreglo[40]=hk41.getSelectedIndex();
                arreglo[41]=hk42.getSelectedIndex();
                arreglo[42]=hk43.getSelectedIndex();
                arreglo[43]=hk44.getSelectedIndex();
                arreglo[44]=hk45.getSelectedIndex();
                arreglo[45]=hk46.getSelectedIndex();
                arreglo[46]=hk47.getSelectedIndex();
                arreglo[47]=hk48.getSelectedIndex();
                arreglo[48]=hk49.getSelectedIndex();
                arreglo[49]=hk50.getSelectedIndex();
                arreglo[50]=hk51.getSelectedIndex();
                arreglo[51]=hk52.getSelectedIndex();
                arreglo[52]=hk53.getSelectedIndex();
                arreglo[53]=hk54.getSelectedIndex();
                arreglo[54]=hk55.getSelectedIndex();
                arreglo[55]=hk56.getSelectedIndex();
                arreglo[56]=hk57.getSelectedIndex();
                arreglo[57]=hk58.getSelectedIndex();
                arreglo[58]=hk59.getSelectedIndex();
                arreglo[59]=hk60.getSelectedIndex();
                arreglo[60]=hk61.getSelectedIndex();
                arreglo[61]=hk62.getSelectedIndex();
                arreglo[62]=hk63.getSelectedIndex();
                arreglo[63]=hk64.getSelectedIndex();




                k=0;
                for(int i=0; i<KeyMcombo.getSelectedIndex()+2; i++){

                    for(int j=0; j<KeyMcombo.getSelectedIndex()+2; j++){

                        matriz[i][j]=arreglo[k];
                        k++;

                    }

                }
                
                
                int det = Determinante.determinante(matriz);

                if(Z26.inver(det)== 0){
                JOptionPane.showMessageDialog(null, "La Matriz ingresada es invalida");
                }else{





               
                Hill texc5=new Hill(Tcifrado2.getText());

                Tclaro2.setText(texc5.descifrar(matriz,KeyMcombo.getSelectedIndex()+2));

                }

                break;

          case 5:

                 int [] arreglo2 = {0,0,0,0,0,0,0,0};
                arreglo2[0]=PerK.getSelectedIndex();
                arreglo2[1]=PerK1.getSelectedIndex();
                arreglo2[2]=PerK2.getSelectedIndex();
                arreglo2[3]=PerK3.getSelectedIndex();
                arreglo2[4]=PerK4.getSelectedIndex();
                arreglo2[5]=PerK5.getSelectedIndex();
                arreglo2[6]=PerK6.getSelectedIndex();
                arreglo2[7]=PerK7.getSelectedIndex();
                String LLave="";
                 for(int i=0; i<KeyMcombo.getSelectedIndex()+2; i++){

                     LLave += arreglo2[i];


                 }
                Permutacion texc6=new Permutacion(Tcifrado2.getText());
                Tclaro2.setText(texc6.descifrar(LLave));
                System.out.println(tipocifrador.getSelectedItem());

                break;
        }


        
}//GEN-LAST:event_descifrarActionPerformed

    private void tipocifradorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tipocifradorActionPerformed
        // TODO add your handling code here:

        switch(tipocifrador.getSelectedIndex()){

          case 0:
                hillPanel.setVisible(false);


                key.setVisible(true);
                hillk.setVisible(false);
                keyb.setVisible(false);
                afinb.setVisible(false);
                MHill.setVisible(false);
                KeyMcombo.setVisible(false);
                break;
          case 1:
                hillPanel.setVisible(false);
                key.setVisible(true);
                hillk.setVisible(false);
                keyb.setVisible(true);
                afinb.setVisible(true);
                MHill.setVisible(false);
                KeyMcombo.setVisible(false);


                break;
          case 2:
                hillPanel.setVisible(false);
                key.setVisible(true);
                hillk.setVisible(false);
                keyb.setVisible(false);
                afinb.setVisible(false);
                MHill.setVisible(false);
                KeyMcombo.setVisible(false);

                break;
          case 3:
                hillPanel.setVisible(false);
                key.setVisible(true);
                hillk.setVisible(false);
                keyb.setVisible(false);
                afinb.setVisible(false);
                MHill.setVisible(false);
                KeyMcombo.setVisible(false);
                break;
          case 4:
                hillPanel.setVisible(true);
                hillk.setVisible(true);
                key.setVisible(true);
                keyb.setVisible(false);
                afinb.setVisible(false);
                MHill.setVisible(true);
                KeyMcombo.setVisible(true);

                break;
          case 5:


                hillPanel.setVisible(false);
                hillk.setVisible(true);
                key.setVisible(false);
                keyb.setVisible(false);
                afinb.setVisible(false);
                MHill.setVisible(true);
                KeyMcombo.setVisible(true);

                break;

            case 6:
                hillPanel.setVisible(false);


                key.setVisible(true);
                hillk.setVisible(false);
                keyb.setVisible(false);
                afinb.setVisible(false);
                MHill.setVisible(false);
                KeyMcombo.setVisible(false);

                break;

            case 7:

                hillPanel.setVisible(false);


                key.setVisible(true);
                hillk.setVisible(false);
                keyb.setVisible(false);
                afinb.setVisible(false);
                MHill.setVisible(false);
                KeyMcombo.setVisible(false);
                
                break;



        }

    }//GEN-LAST:event_tipocifradorActionPerformed

    private void hillkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_hillkActionPerformed
        // TODO add your handling code here:
         if(tipocifrador.getSelectedItem()== "Hill"){
         hillPanel.setVisible(true);

        switch(KeyMcombo.getSelectedIndex()){

          
          case 0:
                    hk1.setVisible(true);
                    hk2.setVisible(true);
                    hk3.setVisible(true);
                    hk4.setVisible(true);
                    hk5.setVisible(false);
                    hk6.setVisible(false);
                    hk7.setVisible(false);
                    hk8.setVisible(false);
                    hk9.setVisible(false);
                    hk10.setVisible(false);
                    hk11.setVisible(false);
                    hk12.setVisible(false);
                    hk13.setVisible(false);
                    hk14.setVisible(false);
                    hk15.setVisible(false);
                    hk16.setVisible(false);
                    hk17.setVisible(false);
                    hk18.setVisible(false);
                    hk19.setVisible(false);
                    hk20.setVisible(false);
                    hk21.setVisible(false);
                    hk22.setVisible(false);
                    hk23.setVisible(false);
                    hk24.setVisible(false);
                    hk25.setVisible(false);
                    hk26.setVisible(false);
                    hk27.setVisible(false);
                    hk28.setVisible(false);
                    hk29.setVisible(false);
                    hk30.setVisible(false);
                    hk31.setVisible(false);
                    hk32.setVisible(false);
                    hk33.setVisible(false);
                    hk34.setVisible(false);
                    hk35.setVisible(false);
                    hk36.setVisible(false);
                    hk37.setVisible(false);
                    hk38.setVisible(false);
                    hk39.setVisible(false);
                    hk40.setVisible(false);
                    hk41.setVisible(false);
                    hk42.setVisible(false);
                    hk43.setVisible(false);
                    hk44.setVisible(false);
                    hk45.setVisible(false);
                    hk46.setVisible(false);
                    hk47.setVisible(false);
                    hk48.setVisible(false);
                    hk49.setVisible(false);
                    hk50.setVisible(false);
                    hk51.setVisible(false);
                    hk52.setVisible(false);
                    hk53.setVisible(false);
                    hk54.setVisible(false);
                    hk55.setVisible(false);
                    hk56.setVisible(false);
                    hk57.setVisible(false);
                    hk58.setVisible(false);
                    hk59.setVisible(false);
                    hk60.setVisible(false);
                    hk61.setVisible(false);
                    hk62.setVisible(false);
                    hk63.setVisible(false);
                    hk64.setVisible(false);

                break;
          case 1:
                    hk1.setVisible(true);
                    hk2.setVisible(true);
                    hk3.setVisible(true);
                    hk4.setVisible(true);
                    hk5.setVisible(true);
                    hk6.setVisible(true);
                    hk7.setVisible(true);
                    hk8.setVisible(true);
                    hk9.setVisible(true);
                    hk10.setVisible(false);
                    hk11.setVisible(false);
                    hk12.setVisible(false);
                    hk13.setVisible(false);
                    hk14.setVisible(false);
                    hk15.setVisible(false);
                    hk16.setVisible(false);
                    hk17.setVisible(false);
                    hk18.setVisible(false);
                    hk19.setVisible(false);
                    hk20.setVisible(false);
                    hk21.setVisible(false);
                    hk22.setVisible(false);
                    hk23.setVisible(false);
                    hk24.setVisible(false);
                    hk25.setVisible(false);
                    hk26.setVisible(false);
                    hk27.setVisible(false);
                    hk28.setVisible(false);
                    hk29.setVisible(false);
                    hk30.setVisible(false);
                    hk31.setVisible(false);
                    hk32.setVisible(false);
                    hk33.setVisible(false);
                    hk34.setVisible(false);
                    hk35.setVisible(false);
                    hk36.setVisible(false);
                    hk37.setVisible(false);
                    hk38.setVisible(false);
                    hk39.setVisible(false);
                    hk40.setVisible(false);
                    hk41.setVisible(false);
                    hk42.setVisible(false);
                    hk43.setVisible(false);
                    hk44.setVisible(false);
                    hk45.setVisible(false);
                    hk46.setVisible(false);
                    hk47.setVisible(false);
                    hk48.setVisible(false);
                    hk49.setVisible(false);
                    hk50.setVisible(false);
                    hk51.setVisible(false);
                    hk52.setVisible(false);
                    hk53.setVisible(false);
                    hk54.setVisible(false);
                    hk55.setVisible(false);
                    hk56.setVisible(false);
                    hk57.setVisible(false);
                    hk58.setVisible(false);
                    hk59.setVisible(false);
                    hk60.setVisible(false);
                    hk61.setVisible(false);
                    hk62.setVisible(false);
                    hk63.setVisible(false);
                    hk64.setVisible(false);

                break;
                
           case 2:
                     hk1.setVisible(true);
                    hk2.setVisible(true);
                    hk3.setVisible(true);
                    hk4.setVisible(true);
                    hk5.setVisible(true);
                    hk6.setVisible(true);
                    hk7.setVisible(true);
                    hk8.setVisible(true);
                    hk9.setVisible(true);
                    hk10.setVisible(true);
                    hk11.setVisible(true);
                    hk12.setVisible(true);
                    hk13.setVisible(true);
                    hk14.setVisible(true);
                    hk15.setVisible(true);
                    hk16.setVisible(true);
                    hk17.setVisible(false);
                    hk18.setVisible(false);
                    hk19.setVisible(false);
                    hk20.setVisible(false);
                    hk21.setVisible(false);
                    hk22.setVisible(false);
                    hk23.setVisible(false);
                    hk24.setVisible(false);
                    hk25.setVisible(false);
                    hk26.setVisible(false);
                    hk27.setVisible(false);
                    hk28.setVisible(false);
                    hk29.setVisible(false);
                    hk30.setVisible(false);
                    hk31.setVisible(false);
                    hk32.setVisible(false);
                    hk33.setVisible(false);
                    hk34.setVisible(false);
                    hk35.setVisible(false);
                    hk36.setVisible(false);
                    hk37.setVisible(false);
                    hk38.setVisible(false);
                    hk39.setVisible(false);
                    hk40.setVisible(false);
                    hk41.setVisible(false);
                    hk42.setVisible(false);
                    hk43.setVisible(false);
                    hk44.setVisible(false);
                    hk45.setVisible(false);
                    hk46.setVisible(false);
                    hk47.setVisible(false);
                    hk48.setVisible(false);
                    hk49.setVisible(false);
                    hk50.setVisible(false);
                    hk51.setVisible(false);
                    hk52.setVisible(false);
                    hk53.setVisible(false);
                    hk54.setVisible(false);
                    hk55.setVisible(false);
                    hk56.setVisible(false);
                    hk57.setVisible(false);
                    hk58.setVisible(false);
                    hk59.setVisible(false);
                    hk60.setVisible(false);
                    hk61.setVisible(false);
                    hk62.setVisible(false);
                    hk63.setVisible(false);
                    hk64.setVisible(false);
                break;

           case 3:
                     hk1.setVisible(true);
                    hk2.setVisible(true);
                    hk3.setVisible(true);
                    hk4.setVisible(true);
                    hk5.setVisible(true);
                    hk6.setVisible(true);
                    hk7.setVisible(true);
                    hk8.setVisible(true);
                    hk9.setVisible(true);
                    hk10.setVisible(true);
                    hk11.setVisible(true);
                    hk12.setVisible(true);
                    hk13.setVisible(true);
                    hk14.setVisible(true);
                    hk15.setVisible(true);
                    hk16.setVisible(true);
                    hk17.setVisible(true);
                    hk18.setVisible(true);
                    hk19.setVisible(true);
                    hk20.setVisible(true);
                    hk21.setVisible(true);
                    hk22.setVisible(true);
                    hk23.setVisible(true);
                    hk24.setVisible(true);
                    hk25.setVisible(true);
                    hk26.setVisible(false);
                    hk27.setVisible(false);
                    hk28.setVisible(false);
                    hk29.setVisible(false);
                    hk30.setVisible(false);
                    hk31.setVisible(false);
                    hk32.setVisible(false);
                    hk33.setVisible(false);
                    hk34.setVisible(false);
                    hk35.setVisible(false);
                    hk36.setVisible(false);
                    hk37.setVisible(false);
                    hk38.setVisible(false);
                    hk39.setVisible(false);
                    hk40.setVisible(false);
                    hk41.setVisible(false);
                    hk42.setVisible(false);
                    hk43.setVisible(false);
                    hk44.setVisible(false);
                    hk45.setVisible(false);
                    hk46.setVisible(false);
                    hk47.setVisible(false);
                    hk48.setVisible(false);
                    hk49.setVisible(false);
                    hk50.setVisible(false);
                    hk51.setVisible(false);
                    hk52.setVisible(false);
                    hk53.setVisible(false);
                    hk54.setVisible(false);
                    hk55.setVisible(false);
                    hk56.setVisible(false);
                    hk57.setVisible(false);
                    hk58.setVisible(false);
                    hk59.setVisible(false);
                    hk60.setVisible(false);
                    hk61.setVisible(false);
                    hk62.setVisible(false);
                    hk63.setVisible(false);
                    hk64.setVisible(false);
                break;

          case 4:
                     hk1.setVisible(true);
                    hk2.setVisible(true);
                    hk3.setVisible(true);
                    hk4.setVisible(true);
                    hk5.setVisible(true);
                    hk6.setVisible(true);
                    hk7.setVisible(true);
                    hk8.setVisible(true);
                    hk9.setVisible(true);
                    hk10.setVisible(true);
                    hk11.setVisible(true);
                    hk12.setVisible(true);
                    hk13.setVisible(true);
                    hk14.setVisible(true);
                    hk15.setVisible(true);
                    hk16.setVisible(true);
                    hk17.setVisible(true);
                    hk18.setVisible(true);
                    hk19.setVisible(true);
                    hk20.setVisible(true);
                    hk21.setVisible(true);
                    hk22.setVisible(true);
                    hk23.setVisible(true);
                    hk24.setVisible(true);
                    hk25.setVisible(true);
                    hk26.setVisible(true);
                    hk27.setVisible(true);
                    hk28.setVisible(true);
                    hk29.setVisible(true);
                    hk30.setVisible(true);
                    hk31.setVisible(true);
                    hk32.setVisible(true);
                    hk33.setVisible(true);
                    hk34.setVisible(true);
                    hk35.setVisible(true);
                    hk36.setVisible(true);
                    hk37.setVisible(false);
                    hk38.setVisible(false);
                    hk39.setVisible(false);
                    hk40.setVisible(false);
                    hk41.setVisible(false);
                    hk42.setVisible(false);
                    hk43.setVisible(false);
                    hk44.setVisible(false);
                    hk45.setVisible(false);
                    hk46.setVisible(false);
                    hk47.setVisible(false);
                    hk48.setVisible(false);
                    hk49.setVisible(false);
                    hk50.setVisible(false);
                    hk51.setVisible(false);
                    hk52.setVisible(false);
                    hk53.setVisible(false);
                    hk54.setVisible(false);
                    hk55.setVisible(false);
                    hk56.setVisible(false);
                    hk57.setVisible(false);
                    hk58.setVisible(false);
                    hk59.setVisible(false);
                    hk60.setVisible(false);
                    hk61.setVisible(false);
                    hk62.setVisible(false);
                    hk63.setVisible(false);
                    hk64.setVisible(false);
                break;
          case 5:
                    hk1.setVisible(true);
                    hk2.setVisible(true);
                    hk3.setVisible(true);
                    hk4.setVisible(true);
                    hk5.setVisible(true);
                    hk6.setVisible(true);
                    hk7.setVisible(true);
                    hk8.setVisible(true);
                    hk9.setVisible(true);
                    hk10.setVisible(true);
                    hk11.setVisible(true);
                    hk12.setVisible(true);
                    hk13.setVisible(true);
                    hk14.setVisible(true);
                    hk15.setVisible(true);
                    hk16.setVisible(true);
                    hk17.setVisible(true);
                    hk18.setVisible(true);
                    hk19.setVisible(true);
                    hk20.setVisible(true);
                    hk21.setVisible(true);
                    hk22.setVisible(true);
                    hk23.setVisible(true);
                    hk24.setVisible(true);
                    hk25.setVisible(true);
                    hk26.setVisible(true);
                    hk27.setVisible(true);
                    hk28.setVisible(true);
                    hk29.setVisible(true);
                    hk30.setVisible(true);
                    hk31.setVisible(true);
                    hk32.setVisible(true);
                    hk33.setVisible(true);
                    hk34.setVisible(true);
                    hk35.setVisible(true);
                    hk36.setVisible(true);
                    hk37.setVisible(true);
                    hk38.setVisible(true);
                    hk39.setVisible(true);
                    hk40.setVisible(true);
                    hk41.setVisible(true);
                    hk42.setVisible(true);
                    hk43.setVisible(true);
                    hk44.setVisible(true);
                    hk45.setVisible(true);
                    hk46.setVisible(true);
                    hk47.setVisible(true);
                    hk48.setVisible(true);
                    hk49.setVisible(true);
                    hk50.setVisible(false);
                    hk51.setVisible(false);
                    hk52.setVisible(false);
                    hk53.setVisible(false);
                    hk54.setVisible(false);
                    hk55.setVisible(false);
                    hk56.setVisible(false);
                    hk57.setVisible(false);
                    hk58.setVisible(false);
                    hk59.setVisible(false);
                    hk60.setVisible(false);
                    hk61.setVisible(false);
                    hk62.setVisible(false);
                    hk63.setVisible(false);
                    hk64.setVisible(false);

                break;
          case 6:
                    hk1.setVisible(true);
                    hk2.setVisible(true);
                    hk3.setVisible(true);
                    hk4.setVisible(true);
                    hk5.setVisible(true);
                    hk6.setVisible(true);
                    hk7.setVisible(true);
                    hk8.setVisible(true);
                    hk9.setVisible(true);
                    hk10.setVisible(true);
                    hk11.setVisible(true);
                    hk12.setVisible(true);
                    hk13.setVisible(true);
                    hk14.setVisible(true);
                    hk15.setVisible(true);
                    hk16.setVisible(true);
                    hk17.setVisible(true);
                    hk18.setVisible(true);
                    hk19.setVisible(true);
                    hk20.setVisible(true);
                    hk21.setVisible(true);
                    hk22.setVisible(true);
                    hk23.setVisible(true);
                    hk24.setVisible(true);
                    hk25.setVisible(true);
                    hk26.setVisible(true);
                    hk27.setVisible(true);
                    hk28.setVisible(true);
                    hk29.setVisible(true);
                    hk30.setVisible(true);
                    hk31.setVisible(true);
                    hk32.setVisible(true);
                    hk33.setVisible(true);
                    hk34.setVisible(true);
                    hk35.setVisible(true);
                    hk36.setVisible(true);
                    hk37.setVisible(true);
                    hk38.setVisible(true);
                    hk39.setVisible(true);
                    hk40.setVisible(true);
                    hk41.setVisible(true);
                    hk42.setVisible(true);
                    hk43.setVisible(true);
                    hk44.setVisible(true);
                    hk45.setVisible(true);
                    hk46.setVisible(true);
                    hk47.setVisible(true);
                    hk48.setVisible(true);
                    hk49.setVisible(true);
                    hk50.setVisible(true);
                    hk51.setVisible(true);
                    hk52.setVisible(true);
                    hk53.setVisible(true);
                    hk54.setVisible(true);
                    hk55.setVisible(true);
                    hk56.setVisible(true);
                    hk57.setVisible(true);
                    hk58.setVisible(true);
                    hk59.setVisible(true);
                    hk60.setVisible(true);
                    hk61.setVisible(true);
                    hk62.setVisible(true);
                    hk63.setVisible(true);
                    hk64.setVisible(true);

                break;

        }
        
         }else{

             switch(KeyMcombo.getSelectedIndex()+2){

                 case 2:
                     PerK.setEnabled(true);
                     PerK1.setEnabled(true);
                     PerK2.setEnabled(false);
                     PerK3.setEnabled(false);
                     PerK4.setEnabled(false);
                     PerK5.setEnabled(false);
                     PerK6.setEnabled(false);
                     PerK7.setEnabled(false);


                     break;
                 case 3:
                     PerK.setEnabled(true);
                     PerK1.setEnabled(true);
                     PerK2.setEnabled(true);
                     PerK3.setEnabled(false);
                     PerK4.setEnabled(false);
                     PerK5.setEnabled(false);
                     PerK6.setEnabled(false);
                     PerK7.setEnabled(false);

                     break;
                 case 4:
                      PerK.setEnabled(true);
                     PerK1.setEnabled(true);
                     PerK2.setEnabled(true);
                     PerK3.setEnabled(true);
                     PerK4.setEnabled(false);
                     PerK5.setEnabled(false);
                     PerK6.setEnabled(false);
                     PerK7.setEnabled(false);
                     break;
                 case 5:
                      PerK.setEnabled(true);
                     PerK1.setEnabled(true);
                     PerK2.setEnabled(true);
                     PerK3.setEnabled(true);
                     PerK4.setEnabled(true);
                     PerK5.setEnabled(false);
                     PerK6.setEnabled(false);
                     PerK7.setEnabled(false);
                     break;
                 case 6:
                      PerK.setEnabled(true);
                     PerK1.setEnabled(true);
                     PerK2.setEnabled(true);
                     PerK3.setEnabled(true);
                     PerK4.setEnabled(true);
                     PerK5.setEnabled(true);
                     PerK6.setEnabled(false);
                     PerK7.setEnabled(false);
                     break;
                 case 7:
                     PerK.setEnabled(true);
                     PerK1.setEnabled(true);
                     PerK2.setEnabled(true);
                     PerK3.setEnabled(true);
                     PerK4.setEnabled(true);
                     PerK5.setEnabled(true);
                     PerK6.setEnabled(true);
                     PerK7.setEnabled(false);
                     break;
                 case 8:
                     PerK.setEnabled(true);
                     PerK1.setEnabled(true);
                     PerK2.setEnabled(true);
                     PerK3.setEnabled(true);
                     PerK4.setEnabled(true);
                     PerK5.setEnabled(true);
                     PerK6.setEnabled(true);
                     PerK7.setEnabled(true);
                     break;





             }



         }

    }//GEN-LAST:event_hillkActionPerformed

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        // TODO add your handling code here:
        Tcifrado2.setText(" ");
        Tclaro2.setText(" ");
    }//GEN-LAST:event_jButton3ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        // TODO add your handling code here:
        Tclaro.setText(" ");
        Tcifrado.setText(" ");

    }//GEN-LAST:event_jButton2ActionPerformed

    private void PerKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_PerKActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_PerKActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Vista().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JComboBox KeyMcombo;
    private javax.swing.JLabel MHill;
    private javax.swing.JComboBox PerK;
    private javax.swing.JComboBox PerK1;
    private javax.swing.JComboBox PerK2;
    private javax.swing.JComboBox PerK3;
    private javax.swing.JComboBox PerK4;
    private javax.swing.JComboBox PerK5;
    private javax.swing.JComboBox PerK6;
    private javax.swing.JComboBox PerK7;
    private javax.swing.JTextArea Tcifrado;
    private javax.swing.JTextArea Tcifrado2;
    private javax.swing.JTextArea Tclaro;
    private javax.swing.JTextArea Tclaro2;
    private javax.swing.JLabel afinb;
    private javax.swing.JButton descifrar;
    private javax.swing.JPanel hillPanel;
    private javax.swing.JButton hillk;
    private javax.swing.JComboBox hk1;
    private javax.swing.JComboBox hk10;
    private javax.swing.JComboBox hk11;
    private javax.swing.JComboBox hk12;
    private javax.swing.JComboBox hk13;
    private javax.swing.JComboBox hk14;
    private javax.swing.JComboBox hk15;
    private javax.swing.JComboBox hk16;
    private javax.swing.JComboBox hk17;
    private javax.swing.JComboBox hk18;
    private javax.swing.JComboBox hk19;
    private javax.swing.JComboBox hk2;
    private javax.swing.JComboBox hk20;
    private javax.swing.JComboBox hk21;
    private javax.swing.JComboBox hk22;
    private javax.swing.JComboBox hk23;
    private javax.swing.JComboBox hk24;
    private javax.swing.JComboBox hk25;
    private javax.swing.JComboBox hk26;
    private javax.swing.JComboBox hk27;
    private javax.swing.JComboBox hk28;
    private javax.swing.JComboBox hk29;
    private javax.swing.JComboBox hk3;
    private javax.swing.JComboBox hk30;
    private javax.swing.JComboBox hk31;
    private javax.swing.JComboBox hk32;
    private javax.swing.JComboBox hk33;
    private javax.swing.JComboBox hk34;
    private javax.swing.JComboBox hk35;
    private javax.swing.JComboBox hk36;
    private javax.swing.JComboBox hk37;
    private javax.swing.JComboBox hk38;
    private javax.swing.JComboBox hk39;
    private javax.swing.JComboBox hk4;
    private javax.swing.JComboBox hk40;
    private javax.swing.JComboBox hk41;
    private javax.swing.JComboBox hk42;
    private javax.swing.JComboBox hk43;
    private javax.swing.JComboBox hk44;
    private javax.swing.JComboBox hk45;
    private javax.swing.JComboBox hk46;
    private javax.swing.JComboBox hk47;
    private javax.swing.JComboBox hk48;
    private javax.swing.JComboBox hk49;
    private javax.swing.JComboBox hk5;
    private javax.swing.JComboBox hk50;
    private javax.swing.JComboBox hk51;
    private javax.swing.JComboBox hk52;
    private javax.swing.JComboBox hk53;
    private javax.swing.JComboBox hk54;
    private javax.swing.JComboBox hk55;
    private javax.swing.JComboBox hk56;
    private javax.swing.JComboBox hk57;
    private javax.swing.JComboBox hk58;
    private javax.swing.JComboBox hk59;
    private javax.swing.JComboBox hk6;
    private javax.swing.JComboBox hk60;
    private javax.swing.JComboBox hk61;
    private javax.swing.JComboBox hk62;
    private javax.swing.JComboBox hk63;
    private javax.swing.JComboBox hk64;
    private javax.swing.JComboBox hk7;
    private javax.swing.JComboBox hk8;
    private javax.swing.JComboBox hk9;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JTextField key;
    private javax.swing.JTextField keyb;
    private javax.swing.JComboBox tipocifrador;
    // End of variables declaration//GEN-END:variables

}
